<?php

namespace App\Http\Requests\Backend;

class SpaceSchemeContentCategoryRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'type' => 'required',
            'space_scheme_id' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'title.required' => '请输入标题',
            'type.required' => '请选择是否图片',
            'space_scheme_id.required' => '空间方案必须关联',
        ];
    }

    public function filldata()
    {
        return [
            'title' => $this->input('title'),
            'type' => $this->input('type'),
            'space_scheme_id' => $this->input('space_scheme_id'),
            'sort' => $this->input('sort'),
        ];
    }
}
